﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OOLib
{
   /// <summary>
   /// A bookmark is a TextContent, which is like a jump target or a label.
   /// </summary>
   public class Bookmark : TextContent, INamed
   {
      #region Constructors

      /// <summary>
      /// Constructor
      /// </summary>
      /// <remarks>
      /// After using this constructor, the ComObj must be set manually!
      /// </remarks>
      public Bookmark() :
         base()
      { }

      /// <summary>
      /// Constructor
      /// </summary>
      /// <param name="comObject">COM object</param>
      public Bookmark(object comObject) :
         base(comObject)
      { }

      #endregion

      #region INamed
      
      /// <summary>
      /// Gets or sets the name of the object.
      /// </summary>
      /// <remarks>
      /// The name is generally unique in the container of the object.
      /// !!! Not tested !!!
      /// </remarks>
      public string Name
      {
         get 
         {
            CheckDisposed();
            return (string)InvokeMethod("getName"); 
         }
         set 
         {
            CheckDisposed();
            InvokeMethod("setName", value); 
         }
      }

      #endregion
   }
}
